package lng.site.balafon.jpa;
import java.util.List;

import lng.site.balafon.model.Question;
import lng.site.balafon.dao.QuestionDAO;

import org.hibernate.criterion.Restrictions;

/**
 * <p>Hibernate DAO layer for Questions</p>
 * <p>Generated at Thu Aug 02 21:53:17 CEST 2012</p>
 *
 * @author Salto-db Generator v1.0.16 / EJB3 + Spring/Hibernate DAO + TestCases
 * @see http://www.hibernate.org/328.html
 */
public class QuestionHibernateDAO extends
		AbstractHibernateDAO<Question, Integer> implements
		QuestionDAO {

	/**
	 * Find Question by titre
	 */
	public List<Question> findByTitre(String titre) {
		return findByCriteria(Restrictions.eq("titre", titre));
	}
	
	/**
	 * Find Question by idTheme
	 */
	public List<Question> findByIdTheme(Integer idTheme) {
		return findByCriteria(Restrictions.eq("idTheme", idTheme));
	}
	
	/**
	 * Find Question by idMembre
	 */
	public List<Question> findByIdMembre(Integer idMembre) {
		return findByCriteria(Restrictions.eq("idMembre", idMembre));
	}
	
	/**
	 * Find Question by contenuQuestion
	 */
	public List<Question> findByContenuQuestion(String contenuQuestion) {
		return findByCriteria(Restrictions.eq("contenuQuestion", contenuQuestion));
	}
	

}
